package org.bright.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import org.bright.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 采购明细表 记录每个采购订单的具体商品信息。
 * </p>
 *
 * @author bright
 * @since 2024-12-10 04:12
 */
@Getter
@Setter
@TableName("purchase_order_details")
@Schema(name = "PurchaseOrderDetails", description = "采购明细表 记录每个采购订单的具体商品信息。")
public class PurchaseOrderDetails extends BaseEntity {

    @Schema(description = "订单ID")
//    @TableId(value = "order_id", type = IdType.AUTO)
    private String orderId;

    @Schema(description = "商品ID")
//    @TableId(value = "product_id", type = IdType.AUTO)
    private Integer productId;

    @Schema(description = "供应商ID")
    @TableField("supplier_id")
    private Integer supplierId;

    @Schema(description = "数量")
    @TableField("quantity")
    private Integer quantity;

    @Schema(description = "单价")
    @TableField("unit_price")
    private Double unitPrice;

    @Schema(description = "每个商品的小计")
    @TableField("subtotal")
    private Double subtotal;
}
